package com.sciencep.pro.core.domain.dto.project;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.sciencep.pro.core.domain.entity.ProChangebase;
import com.sciencep.pro.core.domain.entity.ProNodeDate;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 项目对象
 * @author libe
 */
@Data
@Accessors(chain = true)
public class ProjectTO implements Serializable {


    @ApiModelProperty("项目类型")
    Long proTypeId;

    @ApiModelProperty("项目初始节点ID")
    String proNodeId;

    @ApiModelProperty("项目编号")
    @NotBlank(message = "缺少项目编号")
    String proCode;

    @ApiModelProperty("合同编号")
    String contractNode;

    @ApiModelProperty("项目名称")
    String proName;

    @ApiModelProperty("项目优先级")
    Integer proPriority;

    @ApiModelProperty("项目状态")
    Integer proStatus;

    @ApiModelProperty("归属分社ID")
    String[]  branchIds;


    String branchId;

    @ApiModelProperty("归属分社名称")
    String branchName;

    @ApiModelProperty("归属分社联系人")
    private List<String> branchContactIds;


    @ApiModelProperty("项目概述")
    String proSummary;

    @ApiModelProperty("项目公告")
    String proNotice;

    @ApiModelProperty("项目开始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    Date proStartDay;

    @ApiModelProperty("项目结束日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    Date proEndday;

    @ApiModelProperty("项目节点周期")
    private List<ProNodeDate> proNodeDate;

    @ApiModelProperty("项目资料")
    private List<ProDataTO> proData;

    @ApiModelProperty("项目负责人Id")
    @NotBlank(message = "缺少负责人")
    String proManager;

    @ApiModelProperty("项目负责人名称")
    String proManagerName;


    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("项目类型Code")
    private String typeCode;

    @ApiModelProperty("项目节点名称")
    private String nodeName;

    @ApiModelProperty("合同编号")
    private String contractCode;

    @ApiModelProperty("对接人id")
    private Long contactId;

    @ApiModelProperty("对接人集合")
    private List<ContactTO> contactTOList;

    @ApiModelProperty("部门id")
    @NotBlank(message = "缺少所属部门")
    private String deptId;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("负责人id")
    private String managerId;

    @ApiModelProperty("负责人名称")
    private String managerName;

    @ApiModelProperty("项目周期开始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date startDate;

    @ApiModelProperty("项目周期结束日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date endDate;

    @ApiModelProperty("项目节点")
    private Long typeId;

    @ApiModelProperty("正在审批中的变更列表")
    private List<ProChangebase> proChangebaseList;

    @ApiModelProperty("项目进度")
    private String projectSchedule;

    @ApiModelProperty("项目总计划人天")
    private String projectSumPlanDay;

    @ApiModelProperty("项目实际人天")
    private String projectSumRealityDay;

    @ApiModelProperty("截至当天的绩效人天")
    private String currentSumPerformanceDaily;

    @ApiModelProperty("项目节点")
    private List<ProNodeTO> proNodeList;

    @ApiModelProperty("项目成员")
    private List<ProAssignmentTO> proAssignmentList;

    private String createUserId;

    private String createUserName;

    @ApiModelProperty("工作日期")
    private Integer workDate;

    @ApiModelProperty("项目进度")
    private BigDecimal progress;

    @ApiModelProperty("服务器时间")
    private String serverDate;

}
